package com.example.zhou.musicmodel;

import android.support.annotation.Nullable;

import java.io.Serializable;

/**
 * Created by 11065 on 2016/11/7.
 */

public class MusicBean implements Comparable<MusicBean>, Serializable {

    /**
     * album : unknow
     * artist : 578ee86b43c82c9b1029e763.mp3
     * data : unknow
     * displayname : unknow
     * duration : 159033
     * id : 578ee86b43c82c9b1029e763.mp3
     * name : 578ee86b43c82c9b1029e763.mp3
     */

    private String album;
    private String artist;
    private String data;
    private String displayname;
    private String duration;
    private String id;
    private String name;
    private String filepath;

    public MusicBean() {
        super();
    }

    public MusicBean(String album, String artist, String data, String displayname, String duration, String filepath, String id, String name) {
        super();
        this.album = album;
        this.artist = artist;
        this.data = data;
        this.displayname = displayname;
        this.duration = duration;
        this.filepath = filepath;
        this.id = id;
        this.name = name;
    }

    public String getAlbum() {
        return album;
    }

    public void setAlbum(String album) {
        this.album = album;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getDisplayname() {
        return displayname;
    }

    public void setDisplayname(String displayname) {
        this.displayname = displayname;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    @Override
    public int compareTo(@Nullable MusicBean musicBean) {
        if (null == musicBean) return 1;
        else {

            return this.id.trim().compareTo(musicBean.id.trim());
        }
    }
}